#
# Copyright 2023 The titan-search Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

kmcmake_cc_binary(
        NAME acero_register_example
        SOURCES acero_register_example.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME compute_and_write_csv_example
        SOURCES compute_and_write_csv_example.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME join_example
        SOURCES join_example.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME rapidjson_row_converter
        SOURCES json_row_converter.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME row_wise_conversion_example
        SOURCES row_wise_conversion_example.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME udf_example
        SOURCES udf_example.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME execution_plan_documentation_examples
        SOURCES execution_plan_documentation_examples.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_binary(
        NAME substrait_consumption
        SOURCES substrait_consumption.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)

add_subdirectory(acero)
add_subdirectory(compute)